<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::text::TextDetectorCNN Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d8/de7/namespacecv_1_1text.html">text</a></li><li class="navelem"><a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html">TextDetectorCNN</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="../../de/dc8/classcv_1_1text_1_1TextDetectorCNN-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::text::TextDetectorCNN Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="../../d4/d61/group__text.html">Scene Text Detection and Recognition</a> » <a class="el" href="../../da/d56/group__text__detect.html">Scene Text Detection</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html" title="TextDetectorCNN class provides the functionallity of text bounding box detection. This class is repre...">TextDetectorCNN</a> class provides the functionallity of text bounding box detection. This class is representing to find bounding boxes of text words given an input image. This class uses OpenCV dnn module to load pre-trained model described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_LiaoSBWL17">[147]</a>. The original repository with the modified SSD Caffe version: <a href="https://github.com/MhLiao/TextBoxes">https://github.com/MhLiao/TextBoxes</a>. Model can be downloaded from <a href="https://www.dropbox.com/s/g8pjzv2de9gty8g/TextBoxes_icdar13.caffemodel?dl=0">DropBox</a>. Modified .prototxt file with the model description can be found in <code>opencv_contrib/modules/text/samples/textbox.prototxt</code>.  
 <a href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html#details">More...</a></p>
<p><code>#include &lt;opencv2/text/textDetector.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::text::TextDetectorCNN:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.png" usemap="#cv::text::TextDetectorCNN_map"/>
  <map id="cv::text::TextDetectorCNN_map" name="cv::text::TextDetectorCNN_map">
<area alt="cv::text::TextDetector" coords="0,0,155,24" href="../../de/d25/classcv_1_1text_1_1TextDetector.html" shape="rect" title="An abstract class providing interface for text detection algorithms. "/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac935f5cbfc3305784626d2fa4e49bb25"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html#ac935f5cbfc3305784626d2fa4e49bb25">detect</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> inputImage, std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; &amp;Bbox, std::vector&lt; float &gt; &amp;confidence) <a class="el" href="../../db/de0/group__core__utils.html#ga4d89d63e402ef9ddc48e18e21180fe4a">CV_OVERRIDE</a>=0</td></tr>
<tr class="separator:ac935f5cbfc3305784626d2fa4e49bb25"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1text_1_1TextDetector"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1text_1_1TextDetector')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../de/d25/classcv_1_1text_1_1TextDetector.html">cv::text::TextDetector</a></td></tr>
<tr class="memitem:af674abe17c08fd027863ca4d694d577a inherit pub_methods_classcv_1_1text_1_1TextDetector"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d25/classcv_1_1text_1_1TextDetector.html#af674abe17c08fd027863ca4d694d577a">~TextDetector</a> ()</td></tr>
<tr class="separator:af674abe17c08fd027863ca4d694d577a inherit pub_methods_classcv_1_1text_1_1TextDetector"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aeeca0f5caf9bec0f3f6ae2702057fa9a"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html">TextDetectorCNN</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html#aeeca0f5caf9bec0f3f6ae2702057fa9a">create</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;modelArchFilename, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;modelWeightsFilename, std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &gt; detectionSizes)</td></tr>
<tr class="memdesc:aeeca0f5caf9bec0f3f6ae2702057fa9a"><td class="mdescLeft"> </td><td class="mdescRight">Creates an instance of the <a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html" title="TextDetectorCNN class provides the functionallity of text bounding box detection. This class is repre...">TextDetectorCNN</a> class using the provided parameters.  <a href="#aeeca0f5caf9bec0f3f6ae2702057fa9a">More...</a><br/></td></tr>
<tr class="separator:aeeca0f5caf9bec0f3f6ae2702057fa9a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a24c574de8cd02e4eb14f402c08dc4c2f"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html">TextDetectorCNN</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html#a24c574de8cd02e4eb14f402c08dc4c2f">create</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;modelArchFilename, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;modelWeightsFilename)</td></tr>
<tr class="separator:a24c574de8cd02e4eb14f402c08dc4c2f"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html" title="TextDetectorCNN class provides the functionallity of text bounding box detection. This class is repre...">TextDetectorCNN</a> class provides the functionallity of text bounding box detection. This class is representing to find bounding boxes of text words given an input image. This class uses OpenCV dnn module to load pre-trained model described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_LiaoSBWL17">[147]</a>. The original repository with the modified SSD Caffe version: <a href="https://github.com/MhLiao/TextBoxes">https://github.com/MhLiao/TextBoxes</a>. Model can be downloaded from <a href="https://www.dropbox.com/s/g8pjzv2de9gty8g/TextBoxes_icdar13.caffemodel?dl=0">DropBox</a>. Modified .prototxt file with the model description can be found in <code>opencv_contrib/modules/text/samples/textbox.prototxt</code>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aeeca0f5caf9bec0f3f6ae2702057fa9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeeca0f5caf9bec0f3f6ae2702057fa9a">◆ </a></span>create() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html">TextDetectorCNN</a>&gt; cv::text::TextDetectorCNN::create </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>modelArchFilename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>modelWeightsFilename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &gt; </td>
          <td class="paramname"><em>detectionSizes</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text.TextDetectorCNN_create(</td><td class="paramname">modelArchFilename, modelWeightsFilename</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Creates an instance of the <a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html" title="TextDetectorCNN class provides the functionallity of text bounding box detection. This class is repre...">TextDetectorCNN</a> class using the provided parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">modelArchFilename</td><td>the relative or absolute path to the prototxt file describing the classifiers architecture. </td></tr>
    <tr><td class="paramname">modelWeightsFilename</td><td>the relative or absolute path to the file containing the pretrained weights of the model in caffe-binary form. </td></tr>
    <tr><td class="paramname">detectionSizes</td><td>a list of sizes for multiscale detection. The values<code>[(300,300),(700,500),(700,300),(700,700),(1600,1600)]</code> are recommended in <a class="el" href="../../d0/de3/citelist.html#CITEREF_LiaoSBWL17">[147]</a> to achieve the best quality. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a24c574de8cd02e4eb14f402c08dc4c2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24c574de8cd02e4eb14f402c08dc4c2f">◆ </a></span>create() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d1/d66/classcv_1_1text_1_1TextDetectorCNN.html">TextDetectorCNN</a>&gt; cv::text::TextDetectorCNN::create </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>modelArchFilename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>modelWeightsFilename</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text.TextDetectorCNN_create(</td><td class="paramname">modelArchFilename, modelWeightsFilename</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ac935f5cbfc3305784626d2fa4e49bb25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac935f5cbfc3305784626d2fa4e49bb25">◆ </a></span>detect()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::text::TextDetectorCNN::detect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>inputImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; &amp; </td>
          <td class="paramname"><em>Bbox</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; float &gt; &amp; </td>
          <td class="paramname"><em>confidence</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>Bbox, confidence</td><td>=</td><td>cv.text_TextDetectorCNN.detect(</td><td class="paramname">inputImage</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputImage</td><td>an image expected to be a CV_U8C3 of any size </td></tr>
    <tr><td class="paramname">Bbox</td><td>a vector of Rect that will store the detected word bounding box </td></tr>
    <tr><td class="paramname">confidence</td><td>a vector of float that will be updated with the confidence the classifier has for the selected bounding box </td></tr>
  </table>
  </dd>
</dl>
<p>Implements <a class="el" href="../../de/d25/classcv_1_1text_1_1TextDetector.html#a01b63eca18aca77d9d4e2ce5e8f76bac">cv::text::TextDetector</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/text/<a class="el" href="../../d4/d26/textDetector_8hpp.html">textDetector.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:48 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
